﻿using System;

namespace Assignment2
{
    class Program1
    {
        static void Main(string[] args)
        {
            int num;
            string s = "";
            Console.WriteLine("Enter an positive integer: ");
            s = Console.ReadLine();
            num = int.Parse(s);
            output(num);
        }
        public static void output(int num)
        {
            for (int i = 2; i <= num;)
            {
                if (num % i == 0)
                {
                    Console.Write(i + " ");
                    num = num / i;
                }
                else i++;
            }
        }
    }


}
